package day08.tesk;

public abstract class Printer {
    public abstract void print();
}

class DotMatrixPrinter extends Printer {

    @Override
    public void print() {
        System.out.println("针式打印机");
    }
}

class InkpetPrinter extends Printer {

    @Override
    public void print() {
        System.out.println("喷墨式打印机");

    }
}

class LsaerPrinter extends Printer {
    @Override
    public void print() {
        System.out.println("激光打印机");

    }
}
class Main2{
    public static void main(String[] args) {
        new InkpetPrinter().print();
        new LsaerPrinter().print();
        new DotMatrixPrinter().print();
    }
}
